package com.huanying.goodjob.prize_chance;

import java.sql.Timestamp;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import com.huanying.framework.user.User;

@Entity
@Table(name = "prize_chance")
public class Prize_chance {
	@Id
	@GeneratedValue(strategy = GenerationType.IDENTITY)
	private int id;
	 @OneToOne(cascade = { CascadeType.ALL })
	 @JoinColumn(name = "user_id")
     private User user;  //工人
	 private Timestamp start_time; //抽奖开始时间
	 private Timestamp end_time; //抽奖
	 private int chance_status;  //是否抽奖
	 @Column(name = "status", nullable = false, columnDefinition = "INT default 1")
		private int status;  //状态
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public Timestamp getStart_time() {
		return start_time;
	}
	public void setStart_time(Timestamp start_time) {
		this.start_time = start_time;
	}
	public Timestamp getEnd_time() {
		return end_time;
	}
	public void setEnd_time(Timestamp end_time) {
		this.end_time = end_time;
	}
	public int getChance_status() {
		return chance_status;
	}
	public void setChance_status(int chance_status) {
		this.chance_status = chance_status;
	}
	public int getStatus() {
		return status;
	}
	public void setStatus(int status) {
		this.status = status;
	}
}
